<div class="container">
  <div class="row">
      <div class="col-xs-12 margin-top-10">
          <div class="panel panel-primary">
            <div class="panel-heading">用户注册</div>
              <div class="panel-body">
                <div class="row">
                <div class="secure-forms">
									<h3 class="text-center text-info"><i class="fa fa-user"></i> 欢迎注册股票助手</h3>
									<hr/>
                <div class="col-xs-10 col-xs-offset-1">
                    <form class="form-horizontal" name="registerForm"
                          ng-submit="register(registerForm)" ng-class="{'active':!registerStatus && !vertifyStatus}">

                      <div class="form-group" ng-class="{'has-error': registerForm.userName.$invalid && registerForm.userName.$dirty}">
													<label for="email" class="control-label col-xs-4">邮箱</label>
													<div class="col-xs-4">
															<div class="input-icon">
																	<i class="fa fa-envelope"></i>
																	<input type="text" class="form-control"
																				 ng-pattern="/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/"
																				 id="email" placeholder="邮箱地址" remote-validate="used" ng-model="emailV.email" name="email">
																	<span class="help-block alert-danger alert slide-down" ng-show="registerForm.email.$invalid">邮箱格式不正确</span>
																	<span class="slide-down help-block alert alert-danger" ng-show="registerForm.email.$error.used"><b>错误：</b>邮箱被占用</span>
															</div>
													</div>
                      </div>

                      <div class="form-group" ng-class="{'has-error': registerForm.userPassword.$invalid && registerForm.userPassword.$dirty}">
                        <label for="inputPassword" class="col-xs-4 control-label">密码</label>
                        <div class="col-xs-4">
                          <div class="input-icon">
                            <i class="fa fa-lock"></i>
                            <input type="password" ng-minlength=6 name="userPassword" class="form-control" required id="inputPassword"
                                   ng-model="user.userPassword" placeholder="6-16个字符" ng-maxlength="16">
                        <span class="help-block alert-danger alert slide-down"
                              ng-show="registerForm.userPassword.$error.minlength || registerForm.userPassword.$error.maxlength">
                          密码为6-16个字符
                        </span>
                          </div>
                        </div>
                      </div>

                      <div class="form-group" ng-class="{'has-error': registerForm.rePassword.$invalid && registerForm.rePassword.$dirty}">
                        <label for="rePassword" class="control-label col-xs-4">确认密码</label>
                        <div class="col-xs-4">
                          <div class="input-icon">
                            <i class="fa fa-lock"></i>
                            <input type="password" class="form-control" name="rePassword" id="rePassword"
                                   ng-model="rePassword" required placeholder="确认密码">
                        <span class="help-block alert-danger alert slide-down" ng-show="user.userPassword != rePassword">
                          密码不匹配
                        </span>
                          </div>
                        </div>
                      </div>

                      <!--<div class="form-group" ng-class="{'has-error':registerForm.verifyCode.$invalid && registerForm.verifyCode.$dirty}">
                         <label for="verify" class="control-label col-xs-4">验证码</label>
                          <div class="col-xs-4">
                            <div class="input-icon">
                              <i class="fa fa-key"></i>
                              <input type="text" name="verifyCode" class="form-control" id="verify" required ng-model="verifyCode" placeholder="验证码">
                            </div>
                          </div>
                          <div class="col-xs-4">
                            <button class="btn btn-danger">5962</button>
                          </div>
                      </div>-->

                      <div class="form-group">
                        <label for="refName" class="control-label col-xs-4">推荐人</label>
                        <div class="col-xs-4">
                          <div class="input-icon">
                            <i class="fa fa-user"></i>
                            <input type="text" class="form-control" id="refName" ng-model="user.refName" placeholder="推荐人（选填）">

                          </div>
                        </div>
                      </div>

                      <div class="form-group" ng-class="{'has-error':!term}">
                        <div class="col-sm-offset-4 col-sm-8">
                          <div class="checkbox">
                            <label for="term">
                              <input type="checkbox" id="term" name="term" ng-model="term"> 我已经阅读并同意企乐融的<a href="">《服务协议》</a>
                              <span class="help-block alert-danger alert slide-down" ng-hide="term">请阅读并同意企乐融协议!</span>
                            </label>
                          </div>
                        </div>
                      </div>

                      <div class="form-group">
                        <div class="col-xs-offset-4 col-xs-4 col-xs-offset-4">
                          <button class="btn btn-success btn-block" ng-disabled="registerForm.$invalid || user.userPassword != rePassword || registerForm.$pristine || !term  || processing">立即注册 <i class="fa fa-spin fa-repeat" ng-show="processing"></i> </button>

                        </div>
                      </div>
                    </form>

                    <form class="form-horizontal" name="emailSuccess">
                      <div class="form-group">
                        <div class="col-xs-8 col-xs-offset-2">
                          <div class="media">
                            <i class="fa fa-envelope fa-size-md text-primary pull-left"> </i>
                            <div class="media-body">
                              <h4 class="media-heading">我们已经给您的邮箱 {{ emailV.email }} 发送了一封验证邮件.</h4>
                              <p>请按照邮箱里的提示在 24 小时内激活你的帐号</p>
                              <p>
                                <button  class="btn btn-primary">去邮箱查看</button>
                                没收到？ <button class="btn btn-danger" ng-click="sendEmailAgain()" ng-disabled="sendAgainProcess">
                                再次发送 <i class="fa fa-repeat" ng-class="{'fa-spin':sendAgainProcess}"></i>
                              </button>
                                <span class="help-block">确认邮件是否被拦截,或被误认为垃圾邮件放到垃圾箱了:)</span>
                              </p>
                            </div>
                          </div>
                        </div>
                      </div>
                    </form>

                    <form class="tab-pane form-horizontal" name="lastForm" ng-class="{'active':registerStatus && vertifyStatus}">
                      <div class="form-group secure-forms">
                        <div class="col-xs-offset-2 col-xs-8">
                          <div class="media">
                            <a class="pull-left" href="#">
                              <i class="fa fa-check-circle fa-size-md1 text-success"></i>
                            </a>
                            <div class="media-body">
                              <h4 class="media-heading">恭喜您已完成注册！</h4>
                              <span class="help-block"></span>
                              <p><a class="btn btn-xs btn-primary" ui-sref="anon.login">立即登录</a> 或直接进入<a ui-sref="site.index">首页</a></p>
                            </div>
                          </div>
                        </div>
                      </div>
                    </form>
                  </div>
                </div>

               <!-- <div class="col-xs-5">


                  <div class="create-account">
                    <div class="col-xs-5"></div>
                    <p>
                      已有企乐融账户？&nbsp;
                      <a ui-sref="anon.login" id="register-btn" class="btn btn-info btn-xs">马上登录</a>
                    </p>
                  </div>
                </div>-->
                </div>
            </div>
        </div>




      </div>

  </div>
</div>
